﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CRM.Models.TrainingsSchedules>" %>
<%@ Import Namespace="CRM.Models" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    TrainingsSchedulesCourseEdit
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>TrainingsSchedulesCourseEdit</h2>

<%using (Html.BeginForm("TrainingsSchedulesCourseEdit", "TC", FormMethod.Post, new { @class = "edit_form" }))
    {
        Html.ValidationSummary(true);
      %>

<%: Html.Hidden("IdTrainingsSchedule")%> 

<%--<%:Html.DevExpress().Label(
              settings =>
                  {
                      settings.ControlStyle.CssClass = "lable";
                      settings.Text = "Учебный курс";
                      settings.AssociatedControlName = "IdTrainingsCource";
                      settings.Width = 300;
                  }).GetHtml()%>--%>
<%: Html.DevExpress().ComboBox(
              settings =>
                  {
                      settings.Name = "IdTrainingsCource";
                      settings.ControlStyle.CssClass = "editor";
                      settings.Properties.TextField = "Name";
                      settings.Properties.ValueField = "IdTrainingsCourse";
                      settings.Properties.ValueType = typeof (int);
                      settings.Width = 300;
                  }).BindList(DB.TrainingsCoursesActive).Bind(Model.IdTrainingsCource).GetHtml()%>
<div class="line">
      <%  Html.DevExpress().Label(
              settings =>
                  {
                      settings.ControlStyle.CssClass = "label";
                  }
              ).GetHtml();
          Html.DevExpress().Button(
              settings =>
                  {
                      settings.Name = "btnUpdate";
                      settings.ControlStyle.CssClass = "button";
                      settings.Text = "OK";
                      settings.UseSubmitBehavior = true;
                  }
              ).GetHtml();
%>
</div>

<%:Html.DevExpress().Label(
              settings =>
                  {
                      settings.ControlStyle.CssClass = "lable";
                      settings.Text = "Тренеры:";
                      settings.AssociatedControlName = "IdTrainingsTrainer";
                      settings.Width = 300;
                  }).GetHtml()%>
<%--<%: Html.DevExpress().ComboBox(
              settings =>
                  {
                      settings.Name = "IdTrainingsTrainer";
                      settings.ControlStyle.CssClass = "editor";
                      settings.Properties.TextField = "Name";
                      settings.Properties.ValueField = "IdTrainingsTrainer";
                      settings.Properties.ValueType = typeof (int);
                      settings.Width = 300;
                      settings.ReadOnly = true;
                      
                  }).BindList(DB.GetTrainingsTrainersListByCourseId(Model.IdTrainingsCource)).Bind(Model.IdTrainingsTrainer).GetHtml()%>--%>
<%:Html.DevExpress().TextBox(
              settings =>
                  {
                      settings.Name = "Name";
                      settings.ControlStyle.CssClass = "editor";
                      settings.Width = 300;
                  }
              ).Bind(Model.TrainingsTrainers.Name).GetHtml()%>




<%: Html.Hidden("PlannedDate")%>
<%: Html.Hidden("IdProfineRegion")%> 
<%: Html.Hidden("IdTrainingsPlace")%> 
<%: Html.Hidden("IdTrainingsTrainer")%> 
<%: Html.Hidden("CourseCost")%> 
<%: Html.Hidden("ParticipantCost")%> 
<%: Html.Hidden("CountAvailable")%> 
<%: Html.Hidden("CountRequested")%> 
<%: Html.Hidden("CountApproved")%> 
<%: Html.Hidden("CountActual")%> 
<%: Html.Hidden("IdTrainingCoursesStatus")%> 
<%--<%: Model.IdTrainingsTrainer)%>--%>




<% } %>
</asp:Content>
